//  用户基本信息单行文本输入
//  YZEUserinfoTFViewController.m
//  yilutongxing
//
//  Created by T&J on 2017/3/25.
//  Copyright © 2017年 YZE. All rights reserved.
//

#import "YZEUserinfoTFViewController.h"

@interface YZEUserinfoTFViewController ()

@end

@implementation YZEUserinfoTFViewController
- (IBAction)delectClick:(id)sender {
    self.input_box.text=nil;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.navigationController.navigationBarHidden = NO;
self.title=self.type;
    
    //右侧按钮
    UIBarButtonItem *btn = [[UIBarButtonItem alloc] initWithTitle:@"确定" style:UIBarButtonItemStyleDone target:self action:@selector(onDoneClick:)];
    self.navigationItem.rightBarButtonItem = btn;
}

-(void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    [self.input_box becomeFirstResponder];

}
//确定按钮响应
-(void)onDoneClick:(id)sender{
    if (self.block) {
        self.block(self.input_box.text);
    }
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
